package com.tang.dict;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Aspect
@Component
@Order(9)
public class DictAspect {

    @Pointcut("execution(public com.tang.system.vo.Result com.tang..*Controller.*(..))")
    public void req() {
    }

    @Around(value = "req()")
    public Object reqAspect(ProceedingJoinPoint pjp) throws Throwable {
        Object proceed = pjp.proceed();
        return DictParser.parse(proceed);
    }
}
